﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.Services.Transaction;
using MiragePWF.NH.Logging;
using MiragePWF.NH.Repositories;
using NHibernate.Criterion;
using Wolfut.MirageEE.Domain.Common;
using Wolfut.MirageEE.Domain.CommonUtilities;
using Wolfut.MirageEE.Interface.Common;

namespace Wolfut.MirageEE.Server.Server.Common
{
    [Transactional]
    [AutoLogging]
    public class FirmsService:IFirmsService
    {
        private readonly IRepository<Firm> firmRepository;
        public FirmsService(IRepository<Firm> firmRepository)
        {
            this.firmRepository = firmRepository;
        }
        [Transaction(TransactionMode.Requires)]
        public Firm AddOrUpdate(Firm firm)
        {
            this.firmRepository.Save(firm);
            return firm;
        }
        public Firm GetFirmInfo()
        {
            return null;
        }
    }
}
